#

| Chapter 9 The Ex Editor |

## global

    [address] g[!]/pattern/[commands]

Execute `commands` on all lines that contain `pattern` or, if `address` is specified, on all lines within that range. If `commands` are not specified, print all such lines. If ! is used, execute `commands` on all lines that `don't` contain `pattern`. See v.

### Examples

>     :g/Unix/p
>     :g/Name:/s/tom/Tom/

Reference: file |  | Reference: insert